{extend name="common/public" /}
{block name="content"}

<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
    <div class="widget am-cf">
        <div class="widget-head am-cf">
            <div class="widget-title am-fl">推广信息</div>
          <!--  <div class="widget-function am-fr">
                <a href="javascript:;" class="am-icon-cog"></a>

            </div>-->
            <div style="float: right;color: red;"> 总数：{$total}</div>

        </div>

        <div class="widget-body  widget-body-lg am-fr">
            <table width="100%" class="am-table am-table-compact am-table-bordered tpl-table-black ">
                <thead>

                <tr>

                    <th class="am-lg-text-center">
                        推荐人头像
                    </th>
                    <th class="am-lg-text-center">
                        推荐人昵称
                    </th>
                    <th class="am-lg-text-center">
                        推荐人真实姓名
                    </th>
                    <th class="am-lg-text-center">
                        会员头像
                    </th>
                    <th class="am-lg-text-center">
                        会员昵称
                    </th>
                    <th class="am-lg-text-center">
                        会员姓名
                    </th>
                    <th class="am-lg-text-center">
                        会员电话
                    </th>
                    <th class="am-lg-text-center">
                        会员类型
                    </th>
                    <th class="am-lg-text-center">
                        总订单数
                    </th>
                    <th class="am-lg-text-center">
                        卖出总量
                    </th>
                    <th class="am-lg-text-center">
                        所得金额
                    </th>
                    <th class="am-lg-text-center">
                        注册时间
                    </th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                {foreach $list1 as $v}

                <tr class="gradeX">

                    <td class='am-lg-text-center'><img src="{$v.share_headimgurl}" style="width: 50px;height: 50px;"></td>
                    <td class='am-lg-text-center'> {$v.share_nickname}</td>

                    <td class='am-lg-text-center'>{$v.share_true_name}</td>
                    <td class='am-lg-text-center'><img src="{$v.headimgurl}" style="width: 50px;height: 50px;"></td>
                    <td class='am-lg-text-center'>{$v.nickname}</td>
                    <td class='am-lg-text-center'>{$v.true_name|default=""}</td>
                    <td class='am-lg-text-center'>{$v.phone|default=""}</td>
                    <td class='am-lg-text-center'>
                        {present name="$v.address_type"}   {$v.address_type =="1"?"住宅 ":""}{$v.address_type =="2"?"商铺":""}{$v.address_type =="3"?"写字楼":""}{$v.address_type =="4"?"工厂":""}
                        {/present}
                    </td>
                    <td class='am-lg-text-center'>{$v.order_count}</td>
                    <td class='am-lg-text-center'>{$v.order_weight|default="0"}KG</td>
                    <td class='am-lg-text-center'>{$v.order_money}</td>
                    <td class='am-lg-text-center'>{$v.create_time}</td>
                    <td>
                        <div class="tpl-table-black-operation">
                        <a onclick="openUrl('{:url('userOrderList',['share_id'=>$v['user_id']])}')">
                            <i class="am-icon-eye"></i> 订单明细
                        </a>
                        </div>

                    </td>

                </tr>

                {/foreach}


                </tbody>
            </table>
            {$list|raw}

        </div>
    </div>
</div>

{/block}
{block name='script'}
<script type="text/javascript">

    function setShow(dom,id,user_id) {
        $('#status_'+user_id).text(dom.checked?'正常登录':'拉黑');
        $.get("{:url('lock')}",{'openid':id,'is_lock':dom.checked?0:1})
    }
</script>
{/block}
{/extend}
